// https://pinia.vuejs.org/
import {createPinia} from 'pinia';
import {useKeepALiveNames} from "/@/stores/keepAliveNames";
import {useRoutesList} from "/@/stores/routesList";
import {useTagsViewRoutes} from "/@/stores/tagsViewRoutes";
import {useThemeConfig} from "/@/stores/themeConfig";
import {useUserInfo} from "/@/stores/userInfo";
import {useCommonStore} from "/@/stores/common";

// 创建
const pinia = createPinia();

const registerStore = () => {
    return {
        pinia: pinia,
        keepAliveNamesState: useKeepALiveNames(pinia),
        routesListState: useRoutesList(pinia),
        tagsViewRoutesState: useTagsViewRoutes(pinia),
        themeConfigState: useThemeConfig(pinia),
        userInfoState: useUserInfo(pinia),
        commonStoreState: useCommonStore(pinia),
    };
};
const stores = registerStore();

// 导出
export default stores;